<template>
  <div class="role">
    <el-button type="primary" size="mini" class="roleAdd">添加角色</el-button>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="角色"
        align="center">
      </el-table-column>
      <el-table-column
        prop="name"
        label="启用"
        align="center">
      </el-table-column>
      <el-table-column
        prop="address"
        label="描述"
        align="center">
      </el-table-column>
      <el-table-column
        label="操作"
        align="center">
      <template slot-scope="scope">
          <el-button type="text" size="small">分配权限</el-button>
          <el-button 
          @click="handleClick(scope.row)" 
          type="text" 
          size="small">编辑</el-button>
          <el-button type="text" size="small">删除</el-button>
      </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
    name:"role",
    data() {
        return {
          tableData: []
        }
    },
    methods:{
      handleClick(row){
        console.log(row);
      },
      // 获取角色列表
      async roleListFun(){
        const {data} = await this.$https.getS(this.$store.state.Mock.role.dataRoleList);
        console.log(data);
          
            }
      }
    }
</script>

<style>
.role {
  background-color: #fff;
  width: 97%;
}
.roleAdd {
  margin: 8px 0 0 8px;
}
</style>